package com.lengxf.design;

public class Client {
    public static void main(String[] args) {
        IgoChessman b1, b2, b3, w1, w2;
        IgoChessmanFactory factory = IgoChessmanFactory.getInstance();
        b1 = factory.getIgoChessman("b");
        b2 = factory.getIgoChessman("b");
        b3 = factory.getIgoChessman("b");
        System.out.println("判断两颗黑子是否相同 ： " + (b1 == b2));

        w1 = factory.getIgoChessman("w");
        w2 = factory.getIgoChessman("w");
        System.out.println("判断两颗黑子是否相同 ： " + (w1 == w2));

        b1.display(new Coordinates(1, 2));
        b2.display(new Coordinates(2, 3));
        b3.display(new Coordinates(3, 4));
        w1.display(new Coordinates(5, 6));
        w2.display(new Coordinates(7, 8));
    }


}
